<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title个人博客</title>
	<link rel="stylesheet" href="/Blog/Public/Application/Css/common.css" />
	<link rel="stylesheet" href="/Blog/Public/Application/Css/show.css" />
	<script type="text/JavaScript" src='/Blog/Public/Application/Js/jquery-1.7.2.min.js'></script>
	<script type="text/JavaScript" src='/Blog/Public/Application/Js/common.js'></script>
	<!-- 配置文件 -->
    <script type="text/javascript" src="/Blog/Public/ueditor/ueditor.config.js"></script>
    <!-- 编辑器源码文件 -->
    <script type="text/javascript" src="/Blog/Public/ueditor/ueditor.all.min.js"></script>
    <!-- 实例化编辑器 -->
    <script type="text/javascript">
    	window.UEDITOR_HOME_URL = "/Blog/Public/ueditor/";
        window.onload = function(){ 
        	window.UEDITOR_CONFIG.initialFrameHeight = 200;
        	window.UEDITOR_CONFIG.initialFrameWidth = 610;
        	UE.getEditor('container');
        }
    </script>
</head>
<body>
	<!--头部-->
	<div class='top-search-wrap'>
		<div class='top-search'>
				<img src="/Blog/Public/Application/Images/log.jpg"/>
			<div class='search-wrap'>
				<form action="<?php echo U('Home/Index/serach',array('name'=>name));?>" method='POST'>
					<input type="text" name='name' class='search-content'/>					
					<input type="submit" name='search' value='搜索'/>
				</form>
			</div>
		</div>
	</div>
	<div class='top-nav-wrap'>
		<ul class='nav-lv1'>
			<li class='nav-lv1-li'>
				<a href="<?php echo U('Home/Index/index');?>" class='top-cate'>博客首页</a>
			</li>
			<?php if(is_array($step)): foreach($step as $key=>$v): ?><li class='nav-lv1-li'>
				<a href="<?php echo U('Home/List/index',array('btid'=>$v['id']));?>" class='top-cate'><?php echo ($v["name"]); ?></a>
					<ul>
						<?php if(is_array($v["child"])): foreach($v["child"] as $key=>$value): ?><li><a href="<?php echo U('Home/List/index',array('btid'=>$value['id']));?>"><?php echo ($value["name"]); ?></a></li><?php endforeach; endif; ?>
					</ul>
			</li><?php endforeach; endif; ?>
		</ul>
	</div>
<!--主体-->
	<div class='main'>
		<div class='main-left'>
			<div class='location'>				
				<a href="<?php echo U('Home/Index/index');?>">首页</a>>
				<?php if(is_array($seat)): foreach($seat as $key=>$v): ?><a href="<?php echo U('Home/List/jump',array('jumpid'=>$v['id']));?>"><?php echo ($v["name"]); ?></a>><?php endforeach; endif; ?>
			</div>
			<div class="title">
				<p><?php echo ($text["title"]); ?></p>
				<div>
					<span class='fl'>发布于：<?php echo (date("Y:m:d H:i",$text["time"])); ?></span>					
				</div>
			</div>
			<div class='content'>
				<?php echo ($text["content"]); ?>
			</div>	
			
			<div class='main-left'>
				<div class='location'>				
					<h2><strong><font color="blue">留言列表:</font></strong></h2>
				</div>
					<?php if($count == 0): ?><div class="title">
							<p>暂无留言</p>	
						</div><?php endif; ?>				
					<?php if(is_array($words)): foreach($words as $key=>$v): ?><div class="title">
							<p><?php echo ($v["user"]); ?>:</p>						
							<span class='fl'>留言于：<?php echo (date("Y:m:d H:i",$v["time"])); ?></span>
						</div>
						<div class='content'>
							<?php echo ($v["content"]); ?>						
						</div><?php endforeach; endif; ?>
				<div align="center"><?php echo ($page); ?></div>
			</div>	
			
			<form action="<?php echo U('Home/Show/addwords');?>" method="POST">
				<div class='main-left'>
					<div class='location'>				
						<h2><strong><font color="blue">添加留言:</font></strong></h2>
					</div>
					<div class='content'>							
						<textarea name="content" id="container"></textarea>
					</div>
					<div align="center">
						<input type="hidden" name="id" value="<?php echo ($text["id"]); ?>" />
						<input style="width:60px;height:25px;" type="submit" value="确认"/>
					</div>				
				</div>				
			</form>
		</div>		
	<!--主体右侧-->
	<div class='main-right'>
			<dl>
				<dt>推荐博文</dt>
				<?php if(is_array($recommend)): foreach($recommend as $key=>$v): if(is_array($v["attr"])): foreach($v["attr"] as $key=>$value): if($value['id'] == 2): ?><dd>
								<a href="<?php echo U('Home/Show/index',array('id'=>$v['id']));?>"><?php echo ($v["title"]); ?></a> [<font color="<?php echo ($value["color"]); ?>"><?php echo ($value["name"]); ?></font>]
							</dd><?php endif; endforeach; endif; endforeach; endif; ?>
			</dl>

			<dl>
				<dt>最新发布</dt>
				<?php if(is_array($new)): foreach($new as $key=>$v): ?><dd>
						<a href="<?php echo U('Home/Show/index',array('id'=>$v['id']));?>"><?php echo ($v["title"]); ?></a>							
						<span style="float:right;"><?php echo (date("Y:m:d H:i",$v["time"])); ?></span>				
					</dd><?php endforeach; endif; ?>
			</dl>			
			<dl>
				<dt>友情链接</dt>				
					<dd>
						<a href="http://www.baidu.com/">百度一下</a>			
					</dd>
					<dd>
						<a href="http://www.sohu.com/">搜狐</a>			
					</dd>				
			</dl>			
		</div>
	</div>
</body>
</html>